package com.haidechizi.mybatis.demo.jdbc;

import com.haidechizi.mybatis.demo.dao.UserDao;
import com.haidechizi.mybatis.demo.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-context.xml");
        UserDao userDao = context.getBean(UserDao.class);
        User user = new User(1L);
        user = userDao.get(user);
        System.out.println(user);
    }
}
